package demo_File;

import java.io.File;
import java.io.IOException;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: rei
 * Date: 2025-11-25
 * Time: 16:25
 */
public class Test_mkdirs{
    public static void main(String[] args) throws IOException {
        File file1 = new File("c:/temp/123.txt");
        file1.createNewFile();
        File file2  = new File("c:/temp/345.txt");
        System.out.println(file1.renameTo(file2));
        System.out.println(file1);
    }
    public static void main1(String[] args) {
        File file = new File("c:/temp");

        File file1 = new File("c:/temp/aaa");
        System.out.println(file1.mkdir());

        File file2 = new File("c:/temp/aaa/ccc/bbb");
        System.out.println(file2.mkdir());
        System.out.println(file2.mkdirs());

    }
}
